package com.ldy.core.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ldy.core.entity.BaseEntity;

public interface BaseEntityMapper extends BaseMapper<BaseEntity>{

	@Select("<script>"
			+ "select * from ${tableName} where 1=1 "
			  + "<if test='value !=null and value != \"\"'>and ${name} like CONCAT('%',#{value},'%') </if>"
              + "</script>")
	List<Map<String, Object>> selectList(IPage<BaseEntity> page, @Param("tableName")String tableName, @Param("name") String name,@Param("value")  String value);

}
